.ui-radio {
  position: relative;
}

.ui-radio input {
  opacity: 0;
  position: absolute;
  pointer-events: none;
  left: 0;
  top: 0;
}

.ui-radio label {
  display: flex;
  align-items: flex-start;

  &:before {
    content: '';
    display: block;
    border-radius: 50%;
    border: 1px solid var(--grey300);
    transition: 100ms ease-in-out background-color, border-color;
    background-color: var(--white);
    flex-shrink: 0;
  }
}

.ui-radio input:checked ~ label:before {
  background-color: var(--purple500);
  border: 1px solid transparent;
}

.ui-radio input:checked ~ label:after {
  content: '';
  display: block;
  position: absolute;
  border-radius: 50%;
  background-color: var(--white);
}

.ui-radio input:disabled:checked ~ label:before {
  background-color: #fff;
  border: 1px solid var(--grey300);
}

.ui-radio input:disabled:checked ~ label:after {
  background-color: var(--grey200);
  width: 6px;
  height: 6px;
  top: 6px;
  left: 6px;
}

.ui-radio input:not(:disabled) ~ label {
  cursor: pointer;
}

.ui-radio input:not(:disabled):not(:checked) ~ label:hover:before {
  background-color: var(--grey000);
  border-color: var(--navy600);
}

.ui-radio__label-group {
  display: flex;
  flex-direction: column;
  margin-left: 8px;
}

.ui-radio__label {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--navy900);
  line-height: 1.6rem;
  margin-top: 2px;
}

.ui-radio__hint {
  font-size: 1.2rem;
  line-height: 1.8rem;
  font-weight: 400;
  color: var(--navy800);
  margin-top: 4px;
}

.ui-radio--small label:before {
  height: 14px;
  width: 14px;
}

.ui-radio--small label:after {
  top: 6px;
  left: 6px;
  width: 4px;
  height: 4px;
}

.ui-radio--medium label:before {
  height: 16px;
  width: 16px;
}

.ui-radio--medium label:after {
  top: 6px;
  left: 6px;
  width: 6px;
  height: 6px;
}
